import { SET_USER, DELETE_USER, StateProps } from './constants'
import { initProps } from './state'

export default {
  [SET_USER] (state: StateProps, user: User) {
    state.user = { ...user }
  },
  [DELETE_USER] (state: StateProps) {
    state.user = {...initProps}
  }
}